#ifndef VALIDATIONDIALOG_H
#define VALIDATIONDIALOG_H

#include <QDialog>
#include <QAbstractListModel>

class ValidationListModel : public QAbstractListModel {
public:
    ValidationListModel(QObject *parent = 0);

    int rowCount(const QModelIndex &parent) const;
    QVariant data(const QModelIndex &index, int role) const;

    void setSource(const QSet<QString>& errors);
private:
    QStringList _errors;
};

namespace Ui {
class ValidationDialog;
}

class ValidationDialog : public QDialog
{
    Q_OBJECT
    
public:
    explicit ValidationDialog(QWidget *parent = 0);
    ~ValidationDialog();

public slots:
    void setSource(const QSet<QString>& errors);
    
protected:
    void changeEvent(QEvent *e);
    
private:
    Ui::ValidationDialog *ui;

    ValidationListModel model;
};

#endif // VALIDATIONDIALOG_H
